import React,{Component} from "react";
import {View, StyleSheet, Text, StatusBar, Button} from "react-native";
import Base from "../base/Base";
import LinearGradient from "react-native-linear-gradient";
export default class Home extends Base{
    static navigationOptions = {
        title: 'Home',
        headerBackground:(
            <LinearGradient start={{x:0.3, y: 1}} end={{x: 1, y: 0}} colors={['#E25956','#E7756A','#E98C7A','#EFA588','#F3C69F',]} style={{height: 74}}>
            </LinearGradient>
        )
    };

    render(){
        return (
            <View style={styles.container}>
                <StatusBar
                    backgroundColor="rgba(255,255,255,0)"
                    barStyle="light-content"
                    hidden={false}
                    translucent={true}
                    animated={true}
                />



                <Text>首页</Text>

                <Button
                    title="去个人中心"
                    onPress={() => this.props.navigation.navigate('UserCenter',{
                        uid:10,
                        msg:"你好"
                    })}
                />



                <Button
                    title="Go to Home"
                    onPress={() => this.props.navigation.navigate('Index')}
                />



            </View>
        )
    }
}

const styles = StyleSheet.create({
    container:{
        flex:1,
        backgroundColor:'#f5f5f5'
    }
})